import request from "@/utils/request";

export const userLogin = (params) => {
  return request.post("/admin/login", params);
};

// 商品总数量
export const goodsTotal = () => {
  return request.get("/statistic/product");
};

// 用户总数量
export const userNum = () => {
  return request.get("/statistic/user");
};

// 查询轮播图数据
export const getBannerList = () => {
  return request.get("/banner/list");
};

// 删除单挑轮播图数据
export const bannerDelete = (params) => {
  return request.get(`/banner/delete?bannerid=${params}`);
};

// 创建轮播图
export const createBanner = (params) => {
  return request.post("/banner/add", params);
};

// 获取商品列表
export const getProductList = (params) => {
  return request.get(
    `/pro/list?count=${params.count}&limitNum=${params.limitNum}`
  );
};
